package com.gaogzhen.designPattern.singleton;

public final class Singleton3 {
    private static Singleton3 instance = null;
    private Singleton3() {}
    // 分析线程安全，并说明缺点
    public static synchronized Singleton3 getInstance() {
        if(instance != null) {
            return instance;
        }
        instance = new Singleton3();
        return instance;
    }
}
